import {
	createSSRApp
} from "vue";
import App from "./App.vue";

import piniaPeresit from 'pinia-plugin-persist-uni'
import * as Pinia from "pinia";

import './router/index.js'

export function createApp() {
	const app = createSSRApp(App);
	
	// 1.创建pinia的实例
	const pinia = Pinia.createPinia();
	pinia.use(piniaPeresit)
	// 2.注册到app实例中
	app.use(pinia);
		
	return {
		app,
		pinia
	};
}
